//
//  SLUtils.m
//  MyChatDemo
//
//  Created by DragonYao on 2017/9/11.
//  Copyright © 2017年 DragonYao. All rights reserved.
//

#import "SLUtils.h"

//define keys for UserDefaults
NSString *const kUserNumberId = @"UserNumberId";
NSString *const kUserPassword = @"UserPassword";
NSString *const kUserRegisterId = @"UserRegisterId";
NSString *const kRegisterPassword = @"RegisterPassword";
NSString *const kUserHasLogin = @"UserHasLogin";

//define keys for Notifications
NSString *const kUserLoginStatusNotification = @"UserLoginStatusNotification";
//Others
NSString *const kLoginDomain = @"dragonyaodemacbook-pro.local";

@interface SLUtils ()

@end

@implementation SLUtils

+ (void)showInitialViewWithStoryboard:(NSString *)storyboardName {
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:storyboardName bundle:nil];
    [UIApplication sharedApplication].keyWindow.rootViewController = [storyboard instantiateInitialViewController];
}

+ (BOOL)isNilString:(NSString *)aString {
    
    if ([aString isKindOfClass:[NSNull class]]) {
        return YES;
    }
    if ([aString isEqualToString:@""] || aString.length == 0) {
        return YES;
    }
    return NO;
}

@end
